package com.gillion.grule.client.core;

import java.util.Map;
import java.util.Set;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;





public class ComponentRegister implements ApplicationContextAware
{
    public void setApplicationContext(ApplicationContext applicationContext) {
        Map<String, Object> components = applicationContext.getBeansWithAnnotation(Component.class);
        Set<String> keys = components.keySet();
        for (String key : keys)
            ComponentHolder.save(key, (ExecuteComponent)components.get(key));
    }
}